﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace lauimini_webform.Models
{
    /// <summary>
    /// 菜单结果对象
    /// </summary>
    public class MenusInfoResultDTO
    {
        public MenusInfoResultDTO()
        {
            menuInfo = new List<SystemMenu>();
        }
        /// <summary>
        /// 权限菜单树
        /// </summary>
        public List<SystemMenu> menuInfo { get; set; }

        /// <summary>
        /// logo
        /// </summary>
        public LogoInfo logoInfo { get; set; }

        /// <summary>
        /// Home
        /// </summary>
        public HomeInfo homeInfo { get; set; }
    }

    public class LogoInfo
    {
        public string title { get; set; } = "统计分析系统";
        public string image { get; set; } = "/Static/images/myTitle.png";
        public string href { get; set; } = "";
    }

    public class HomeInfo
    {
        public string title { get; set; } = "首页";
        public string href { get; set; } = "index.aspx";

    }

    /// <summary>
    /// 树结构对象
    /// </summary>
    public class SystemMenu
    {
        /// <summary>
        /// 数据ID
        /// </summary>
        public long id { get; set; }

        /// <summary>
        /// 父级ID
        /// </summary>
        public long pid { get; set; }

        /// <summary>
        /// 节点名称
        /// </summary>
        public string title { get; set; }

        /// <summary>
        /// 节点地址
        /// </summary>
        public string href { get; set; }

        /// <summary>
        /// 新开Tab方式
        /// </summary>
        public string target { get; set; } = "_self";

        /// <summary>
        /// 菜单图标样式
        /// </summary>
        public string icon { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int sort { get; set; }

        /// <summary>
        /// 子集
        /// </summary>
        public List<SystemMenu> Child { get; set; }
    }
}